package template

var StrFilterKey = &StrFilter{}

type (
	StrFilter struct {
		Title string
		Id int64
		Description string
		Type int
	}

	StrFilterSlice []*StrFilter
)

func (p *StrFilterSlice) Len() int {
	return len(*p)
}

func (p *StrFilterSlice) Less(i, j int) bool{
	return (*p)[i].Id < (*p)[j].Id
}
func (p *StrFilterSlice) Swap(i, j int) {
	(*p)[i],(*p)[j] = (*p)[j],(*p)[i]
}

func init()  {
	templates[StrFilterKey] = make([]*StrFilter,0)
}

func (p *StrFilter) NewInstance() interface{} {
	return &StrFilter{}
}




